-- GENERATED SPELL FOR [Iron Golem Custodian] --


function spell0_27985(pUnit, Event) --@Crush Armor,n/a--
pUnit:FullCastSpellOnTarget(33661,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27985', 30348, 1)
end

function spell1_27985(pUnit, Event) --@Ground Smash,Self--
pUnit:FullCastSpellOnTarget(12734,pUnit)
pUnit:RegisterEvent('Sorts_27985', 2335, 1)
end

function spell2_27985(pUnit, Event) --@Ground Smash,Self--
pUnit:FullCastSpellOnTarget(59865,pUnit)
pUnit:RegisterEvent('Sorts_27985', 2270, 1)
end

function Sorts_27985(pUnit, Event)
local choix_sorts_27985 = math.random(0, 2)
if choix_sorts_27985 == 0 then
pUnit:RegisterEvent('spell0_27985', 1, 1)
end
if choix_sorts_27985 == 1 then
pUnit:RegisterEvent('spell1_27985', 1, 1)
end
if choix_sorts_27985 == 2 then
pUnit:RegisterEvent('spell2_27985', 1, 1)
end
end

function mob27985_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27985', math.random(1500, 3000), 1)
end

function mob27985_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27985_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27985_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27985, 1, 'mob27985_Action')
RegisterUnitEvent(27985, 2, 'mob27985_Leave')
RegisterUnitEvent(27985, 3, 'mob27985_Kill')
RegisterUnitEvent(27985, 4, 'mob27985_Die')
